home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / BINOBJ32.ZIP / BINOBJ32.DOC next >
Text File  |  1996-11-06  |  3KB  |  86 lines

  1. BIN to OBJ 32 converter, version 0.6ß Copyleft Mr. Baggins/EXTRAVAGANZA
  2.  
  3. Coded for WATCOM C/C++ (but i think any flat model will do if only
  4.                         seg names will match ;) )
  5.  
  6. I AM NOT RESPONSIBLE FOR ANYTHING, THIS PROGRAM IS FREE SO USE IT ON YOUR
  7. OWN RISK.
  8.  
  9. The Story:
  10.   Two days ago I downloaded yet another binary to obj converter, hmmm...
  11. and, as usual, not able to handle bigger files than 64k. So I get mad and
  12. dug in docs, specs, and *.OBJ files and wrote my own converter that CAN
  13. convert ANY files. (ANY size == up to 4Gb)
  14.  
  15. Usage:
  16.   BIN2OBJ32  <-c> InFile[.BIN] <OutFile[.OBJ]> <PublicName>
  17.  
  18.   Where:
  19.     <> means that parameter is optional (InFile will be used)
  20.  
  21.     -c tells converter to place data in _TEXT (CODE) segment instead of _DATA
  22.  
  23.  - you only have to specify the source binary file, destination .OBJ
  24.    will have the same name, and PUBLIC name will be the name of file
  25.    w/o extension.
  26.  
  27.  - by default converter places binary data in _DATA segment, thus makes it
  28.    accessible as normal external data. If you want it to be accessible
  29.    as a procedure specify -c option and data will be placed in _TEXT (CODE)
  30.    segment.
  31.  
  32.  - Underscore before variable name and after procedure name will be forced !
  33.    Hmm... you have to live with this one, I'm compiling for register calling
  34.    convention under WATCOM C, and in this convention I have to have those
  35.    underscores. I don't think it's worth to differ this types, if you don't
  36.    need those '_' it's not a problem - your var will look like this:
  37.    _Table and not Table
  38.  
  39.  _ Last but not least: VaRiAbLe NaMes ArE cAsE sEnSiTiVe !!!
  40.  
  41. Examples:
  42.  
  43.  BIN2OBJ32 -c PICTURE.TGA LOGO.OBJ Our_Cool_Logo
  44.  
  45.    this will make file LOGO.OBJ with PICTURE.TGA accessible from your C
  46.    program as:
  47.  
  48. for register calling conv.:
  49.      extern void Our_Cool_Logo( void );
  50.  
  51. for stack calling conv.:
  52.      extern void Our_Cool_Logo_( void );
  53.  
  54. ---
  55.  BIN2OBJ32 PICTURE.TGA LOGO.OBJ Our_Cool_Logo
  56.  
  57.    and this will make file LOGO.OBJ with PICTURE.TGA accessible from your C
  58.    program as:
  59.  
  60. for register calling conv.:
  61.     extern char Our_Cool_Logo;   OR
  62.     extern char Our_Cool_Logo[Size]; - where Size is the size of PICTURE.TGA
  63.  
  64. for stack calling conv.:
  65.     extern char _Our_Cool_Logo;   OR
  66.     extern char _Our_Cool_Logo[Size]; - where Size is the size of PICTURE.TGA
  67.  
  68.  
  69.  
  70. Author:
  71.   Jan Rekorajski a.k.a Mr. Baggins
  72.   e-mail: jr211@zodiac2.mimuw.edu.pl
  73.  
  74.   I'm a coder in Polish demo group Extravaganza, but we are currently working
  75.   on commercial games... so no demoscene productions :(, as you may have
  76.   guessed I'm coding for WATCOM C and ASM :)
  77.   I'm studying informatics at Warsaw University, now at second year.
  78.  
  79. History:
  80.  v 0.5  4-11-96 at 6.00 am
  81.    - Initial version
  82.    - Only DATA segment support
  83.  
  84.  v 0.6  5-11-96 at 3.00 am - First public release
  85.    - Added support of CODE seg. "variables"
  86.